package com.flyduck.system.vo.menu.trans;


import cn.hutool.core.bean.BeanUtil;
import com.flyduck.system.entity.SysMenuEntity;
import com.flyduck.system.vo.menu.SysMenuTreeSelectRespVO;
import com.google.common.base.Function;


/**
 * @program: flyduck-platform
 * @description:
 * @author: flyduck
 * @create: 2021-02-01 12:42
 **/
public class SysMenuEntityToSysMenuTreeSelectRespVO implements Function<SysMenuEntity, SysMenuTreeSelectRespVO> {

    @Override
    public SysMenuTreeSelectRespVO apply(SysMenuEntity sysMenuEntity) {
        SysMenuTreeSelectRespVO sysDeptTreeSelectRespVO = new SysMenuTreeSelectRespVO();
        BeanUtil.copyProperties(sysMenuEntity,sysDeptTreeSelectRespVO);
        sysDeptTreeSelectRespVO.setId(sysMenuEntity.getId()+"");
        sysDeptTreeSelectRespVO.setParentId(sysMenuEntity.getParentId()+"");
        sysDeptTreeSelectRespVO.setSort(sysMenuEntity.getSort()+"");
        return sysDeptTreeSelectRespVO;
    }
}
